import React, {Component} from "react";
import {
  View, 
  Text, 
  ScrollView,
} from "react-native";
import {StackNavigator, TabNavigator} from "react-navigation";

import IndexPage from "./containers/IndexPage";
import ShoppingMall from "./containers/ShoppingMall";
import PersonalCenter from "./containers/personal/PersonalCenter";
import ShoppingIndex from "./page/shoppingIndex";
import HealthEdu from "./page/healthEdu";
import Login from "./containers/login";
import Register from "./containers/register";
import HealthRecord from "./containers/personal/HealthRecord";
import RegisterCode from "./containers/personal/RegisterCode";
import MyWallet from "./page/mywallet/MyWallet";
import AllAssets from "./page/mywallet/AllAssets";
import CashBalance from "./page/mywallet/CashBalance";


const TabContainer = TabNavigator(
  {
    IndexPage: {
      screen: IndexPage,
    },
    ShoppingMall: {
      screen: ShoppingMall,
    },
    PersonalCenter: {
      screen: PersonalCenter,
    }
  },
  {
    lazy: true,
    tabBarPosition: "bottom",
    swipeEnabled: false,
    animationEnabled: false,
    tabBarOptions: {
      activeTintColor: "#3CFF61",
      inactiveTintColor: "#525252",
      scrollEnabled: false,
      showIcon: true,
      indicatorStyle: {
        height: 0,
      },
      style: {
        backgroundColor: "#fff",
      }
    }
  }
)

const App = StackNavigator(
  {
    //御易健首页；
    Home: {
      screen: TabContainer,
      navigationOptions: {
        headerLeft: null,
        headerStyle: {
          backgroundColor: "#e1e1e1",
        },
      }
    },
    //个人中心相关；
    //登录；
    login: {
      screen: Login,
    },
    //注册；
    register: {
      screen: Register,
    },
    // //个人中心；
    // personalCenter: {
    //   screen: PersonalCenter,
    // },
    //商城
    shoppingIndex: {
      screen: ShoppingIndex,
    },
    //健康教育；
    healthEdu: {
      screen: HealthEdu,
    },
    //我的健康档案；
    healthRecord: {
      screen: HealthRecord,
    },
    //注册邀请码;
    registerCode: {
      screen: RegisterCode,
    },
    //我的钱包；
    myWallet: {
      screen: MyWallet,
    },
    //我的钱包的总易积分；
    allAssets: {
      screen: AllAssets,
    },
    //我的钱包的现金余额；
    cashBalance: {
      screen: CashBalance,
    }
  }
)

export default App;



// import React, {Component} from "react";
// import {View, Text, ScrollView} from "react-native";
// import { NavBar, Icon } from 'antd-mobile';

// import Register from "./containers/register"; //注册页面；

// //组件的练习
// import ActivityIndicator from "./example/ActivityIndicator"; //加载旋转的圆圈；
// import DrawerLayoutAndroid from "./example/DrawerLayoutAndroid"; //android的抽屉效果；
// import FlatList from "./example/FlatList"; //列表的展示；
// import KeyboardAvoidingView from "./example/KeyboardAvoidingView"; //根据键盘的位置调整页面布局；
// import Modal from "./example/Modal"; //用来覆盖包含React Native 根视图的原生视图；
// import PickerExm from "./example/Picker"; //调用原生的selected；
// import ProgressBarAndroid from "./example/ProgressBarAndroid"; //进度条；
// import Slider from "./example/Slider"; //进度条；
// import StatusBar from "./example/StatusBar"; //状态栏；
// import Switches from "./example/Switch"; //状态栏；
// import TextInput from "./example/TextInput"; //输入框；
// import ToolbarAndroid from "./example/ToolbarAndroid"; //android中的工具条；
// import ViewPageAndroid from "./example/ViewPageAndroid"; //android中的页面切换；
// import WebView from "./example/WebView"; //获取网页；

// //API的练习
// import AlertExm from "./API/Alert"; //弹出框；
// import Animated from "./API/Animated"; //动画；
// import AppState from "./API/AppState"; //判断app是在前台运行，还是在后台运行；
// import BackAndroid from "./API/BackHandler"; //android的返回键；
// import ImagePicker from "./API/ImagePicker"; //使用相册功能；
// import DatePickerAndroid from "./API/DatePickerAndroid"; //使用android日期功能；
// import GeolocationExam from "./API/Geolocation"; //使用定位功能；
// import KeyboardExam from "./API/Keyboard"; //控制键盘相关的事件；
// import NetinfoExam from "./API/NetInfo"; //监听网络事件；
// import PermissionsAndroid from "./API/PermissionsAndroid"; //android权限处理；
// import Share from "./API/Share"; //分享；
// import ToastAndroid from "./API/ToastAndroid"; //提示信息；
// import Vibration from "./API/Vibration"; //震动；
// import AsyncStorage from "./API/AsyncStorage"; //本地存储；

// //使用第三方的模块；
// import GetNavi from "./API/getNavi"; //调用第三方的地图；
// import BarcodescannerExam from "./API/Barcodescanner"; //扫描二维码的功能
// import VideoExam from "./API/Video"; //视频播放功能；
// import SQLite from "./API/sQLite"; //sqlite库的使用；


// export default class Route extends Component {
//   constructor(props) {
//     super(props);
//   }
//   render() {
//     return (
//       <View style={{flex: 1, paddingTop: 22}}>
//         <ImagePicker />
//       </View>
//     );
//   }
// } 
